﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Baosight.Ccs.Mail.Properties;

namespace Baosight.Ccs.Mail
{
    /// <summary>
    /// SMTP configuration
    /// </summary>
    public class SmtpConfig
    {
        private string smtpUser;

        public string SmtpUser
        {
            get { return smtpUser; }
            set { smtpUser = value; }
        }

        private string credential;

        public string Credential
        {
            get { return credential; }
            set { credential = value; }
        }

        private string smtpServer;

        public string SmtpServer
        {
            get { return smtpServer; }
            set { smtpServer = value; }
        }

        private string fromAddress;

        public string FromAddress
        {
            get { return fromAddress; }
            set { fromAddress = value; }
        }


        public SmtpConfig(string smtpServer, string user, string credential, string fromAdrress)
        {
            this.smtpServer = smtpServer;
            this.smtpUser = user;
            this.credential = credential;
            this.fromAddress = fromAddress;
        }

        public SmtpConfig()
        {
            this.smtpServer = Settings.Default.SmtpServer;
            this.smtpUser = Settings.Default.SmtpUser;
            this.credential = Settings.Default.SmtpUserCredential;
            this.fromAddress = Settings.Default.SmtpFromAddress;
        }
    }
}
